home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / assemblers / cas.lha / err.doc < prev    next >
Encoding:
Text File  |  1992-08-12  |  22.6 KB  |  559 lines

  1. (6) Diagnostics
  2.    The assembler will only print out a screenful of diagnostics (24) before
  3. it stops.  When applicable, the file and line number where the error occurred
  4. are given.  An attempt is made to indicate the line where the error actually
  5. occurred, rather than where its effects were first seen.
  6.  
  7.    Assembly is stopped at certain points if errors have been detected, since it
  8. would make no sense to go on past the given point.
  9.  
  10.    The following is an alphabetized listing of diagnostics classified by
  11. whether they are fatal or non-fatal.  Assembly always stops after the former
  12. but will continue after the latter (until the error limit is reached).
  13.  
  14.    Internal errors should be reported to me, see the README file at the FTP
  15. site csd4.csd.uwm.edu in the directory /pub/8051 or /pub/micro/8051 for more
  16. information.  If you get an internal error, you should display the object file
  17. using the object file display program provided with the assembler.  If you
  18. want me to resolve the bugs (if any exist) I would need to see this as well.
  19.  
  20.    Alternatively, the source for the assembler is yours.  If you want to make
  21. modifications, try your hand at it, and if something significant results let
  22. everyone know by placing it in the public domain.
  23.  
  24.    (a) Fatal Errors
  25.    These diagnostics will cause assembly to stop immediately, they usually
  26. represent serious inconsistencies or serious points of confusion for the
  27. assembler that makes further processing impossible or pointless.
  28.  
  29. Address <Decimal Number> out of range
  30.    The location counter points to the indicated address, which lies outside the
  31.    address space of the current segment.  These address spaces are as follows:
  32.                      Type       Low        High
  33.                      code         0        65535  (or ffff hexadecimal)
  34.                      xdata        0        65535  (or ffff hexadecimal)
  35.                      data         0          255  (or   ff hexadecimal)
  36.  
  37. Attempting to write to a non-code segment.
  38.    This happens if you try to use any image generating statement (db/byte,
  39.    dw/word, or any opcode) in a data or xdata segment.  Only code segments will
  40.    accept these statements.
  41.  
  42. Bad opcode initialization.
  43.    This is an internal error you should never see.  It indicates an internal
  44.    inconsistency in the assembler's opcode tables.  These tables are used to
  45.    process the 8051 mnemonics.
  46.  
  47. Cannot fit segment.
  48.    The linker tries its best to fit all the relatively addressed segment in the
  49.    tightest fitting space it can.  It may fail to pack them all in, if they can
  50.    only fit real tightly, or your segments may actually not fit at all.  Use
  51.    the object file display program that accompanies this assembler to look at
  52.    your object files in some detail.
  53.  
  54. Cannot open <FILE>
  55.    An file was lost sometime during processing, or the file named probably
  56.    does not exist, or is not readible.
  57.  
  58. Cannot open object file for <FILE>.
  59.    The object file for the source file indicated was somehow lost or made
  60.    inaccessible between the time it was created and the time it was processed
  61.    by the linker.
  62.  
  63. Cannot open output file.
  64.    For some unexpected reason, the assembler could not create an .hex output
  65.    file.  If you're running this on a UNIX, then you're probably assembling
  66.    output into a directory where you have no write access.  Also possible: you
  67.    ran out of disk space.
  68.  
  69. Cannot reopen <FILE>
  70.    A failure to reopen the current file after processing an include file
  71.    occurred.  This indicates either an internal flaw in the assembler or that
  72.    something happened to the file during assembly.
  73.  
  74. Corrupt object file <NAME>.
  75.    A rudimentary check are made on object files.  The file indicated didn't pass
  76.    that check.  It's was either corrupted, or the assembler itself has an
  77.    internal flaw that made it produce corrupt object files.
  78.  
  79. Could not restore <FILE>'s position.
  80.    A failure to resume processing the current file past the most recent include
  81.    statement occurred.  This indicates either an internal flaw in the assembler
  82.    or that the file undergoing processing was corrupted during assembly.
  83.  
  84. Could not save <FILE>'s position.
  85.    A transient error occurred while setting up to include another file.  This
  86.    is either a serious system flaw, or an internal flaw in the assembler.
  87.  
  88. Expression too complex ... aborting.
  89.    If you see this, you must be Lieutenant Commander Data.  An expression has
  90.    to be pretty complicated before it confuses the assembler.  Break it up,
  91.    by symbolically defining subexpressions first.
  92.  
  93. Internal error (0).
  94.    An inconsistency was detected by the linker in the object file undergoing
  95.    processing.  A relocation item of undefined type was found.
  96.  
  97. Internal error (1).
  98.    An inconsistency was detected by the linker in the object file undergoing
  99.    processing.  An undefined expression was found.
  100.  
  101. Internal error (2).
  102.    A flaw in the assembler made it lose track of all the code segments, even
  103.    though at least one was defined.
  104.  
  105. Internal error (3).
  106.    A flaw in the assembler made it think that a ds/rb, or rw statement was
  107.    reserving memory outside the segment where it was defined.
  108.  
  109. Internal error (4).
  110.    A flaw in the assembler caused it to try and relocate two or more items to
  111.    the same address.  This can also be caused by a corrupt object file.
  112.  
  113. Internal error (5).
  114.    A flaw in the assembler caused it to have trouble resolving an expression
  115.    during linking.  This can also be caused by a corrupt object file.
  116.  
  117. Internal error (6).
  118.    A flaw in the assembler made it fail to sort the list of items to be
  119.    relocated.  A corrupt object file can cause this too.
  120.  
  121. Internal error (7).
  122.    A flaw in the assembler made it think it was trying to patch up a hole of
  123.    size other than 1 or 2 bytes.  This can also be caused by a corrupt object
  124.    file.
  125.  
  126. Internal error (8).
  127.    The assembler is expecting an object file larger than what it sees.  This
  128.    is the result of either an internal flaw or corrupt object file.
  129.  
  130. Invalid object file <NAME>.
  131.    The first type bytes of all object files are 55 and aa (hexadecimal).  The
  132.    object file undergoing processing doesn't show this.  It's was either
  133.    corrupted, or the assembler itself has an internal flaw that made it produce
  134.    corrupt object files.
  135.  
  136. Invalid option: -<OPTION>
  137.    Only -c and -o are recognized.
  138.  
  139. Missing ';' after include statement.
  140.    The include statement (like all other statements) needs to be followed
  141.    by a semicolon, or otherwise be the last statement on the line.
  142.  
  143. Missing filename in 'include'
  144.    The include statement has the form: include "FILE", with the file name
  145.    enclosed in double-quotes, as indicated.
  146.  
  147. Out of memory.
  148.    The assembler's resources exceeded the system's available space.
  149.    If this happens during linking it may point to the high degree of
  150.    interconnectivity between modules thereby indicating a need to make the
  151.    interfaces between modules more clean-cut.  If it happens during assembly
  152.    it may point to a need to break the assembly-language file into smaller
  153.    modules.
  154.  
  155. Overlapping segments: <FILE> [<LINE>] and <FILE> [<LINE>].
  156.    The segments in the indicated places have overlapping ranges of addresses.
  157.    Move one or both of them, if possible.
  158.  
  159. Overlapping segments at [<LINE>] <FILE> and [<LINE>] <FILE>.
  160.    This one is actually an internal error.
  161.  
  162. Statement too complex
  163.    If you see this, you must be Lieutenant Commander Data.  An statement has
  164.    to be pretty complicated with many layers of if's and else's and brackets
  165.    '{' and '}' before it confuses the assembler.  There is no direct recourse
  166.    here other than to try and simplify your program.
  167.  
  168. Too many nested include files.
  169.    Up to 5 levels of nested includes are allowed.
  170.  
  171. Too many segments.
  172.    Up to 32 segments can be defined per file.  Any occurrence of the org/at or
  173.    seg statements will start a new segment.  The first 5 segments are defined by
  174.    and used internally by the assembler, which leaves you with 27.
  175.  
  176. Undefined segment type.
  177.    Only the types: code, xdata, or data can be used with the seg statement.
  178.  
  179. Unexpected EOF.
  180.    Attempted to read past the end of an object file.
  181.    The object file is corrupt
  182.  
  183. Use: <CAS> -c File... to assemble.
  184.    At least one input file should be listed with the -c option.
  185.  
  186. Use: <CAS> -o Output File... to link.
  187.    At least one source or object file should be listed with the -o option.
  188.  
  189. Use: <CAS> [-o Output] File... to link.
  190.    At least one source or object file should be listed with the -o option or
  191.    with no options.
  192.  
  193.    (b) Non-Fatal Errors
  194.    These are errors the assembler will attempt to recover from and continue
  195. processing after.
  196.  
  197. Address <NAME> redeclared as number: <FILE> <FILE>
  198.    The symbol indicated was declared as a global number in the first indicated
  199.    files and as a global address in the second.
  200.  
  201. Address cannot appear in: x? x: x.
  202.    Addresses cannot be used as conditions of conditionals in the combination
  203.    address? x: x.  Only numeric values can be used there.
  204.  
  205. Address cannot be used with infix operator.
  206.    The only allowable combinations of addresses involving infix operations are
  207.    pretty much like in C:
  208.                              number + address
  209.                              address + number
  210.                              address - number
  211.    In addition, the combination
  212.                            reg.bit
  213.    can be used for bit addressible registers "reg" and values of 0 to 7 for
  214.    "bit".
  215.  
  216. Address cannot be used with prefix operator.
  217.    Prefix operators other than + (-, !, ~, high, low) can only be used with
  218.    numeric values, not addresses.
  219.  
  220. Address of wrong type in reg.pos
  221.    Only data or sfr addresses can be used in the place referred to ("reg").
  222.  
  223. Address type mismatch.
  224.    Rudimentary type-checking is done for operations involving bit addresses,
  225.    data and sfr addresses, or code addresses.  Type checking is not done on
  226.    xdata addresses, as there are not 8051 operations that directly involve such
  227.    addresses.
  228.  
  229. Addresses of different types cannot be subtracted.
  230.    Addresses must be of the same type in order to be subtracted.  They can be
  231.    of different segments, however, as long as the segments have the same type.
  232.  
  233. Attempting to make local label global.
  234.    Local (numeric) labels cannot be made global.
  235.  
  236. Attempting to redefine <NAME>
  237.    The label indicated was used in the context LABEL:, but is already defined,
  238.  
  239. Bad hexadecimal character.
  240.    A hexadecimal character takes the form: \xHK or \XHK, where H and K are
  241.    hexadecimal digits.  Exactly two hex digits must be seen.  An \x by itself
  242.    without any following hexadecimal digits is interpreted as just x.
  243.  
  244. Binary number has non-binary digits.
  245.    A number with a binary prefix (0b, 0B) or binary suffix (b, B) can only
  246.    contain the digits 0 and 1.
  247.  
  248. Bit address out of range.
  249.    Bit addresses range only from 0 to ff hex (0 to 255 decimal).
  250.  
  251. Bit position out of range.
  252.    The operation reg.pos only allows values of 0 to 7 for "pos".
  253.  
  254. Byte value out of range (hex value).
  255.    An immediate byte value in the range -80 (hex) to ff (hex) (or -128 to 255)
  256.    is required in this context.
  257.  
  258. Cannot use @A+A
  259.    Only @A+DPTR, and @A+PC can be used with the 8051 language.
  260.  
  261. Cannot use @A+AB.
  262.    Only @A+DPTR, and @A+PC can be used with the 8051 language.
  263.  
  264. Cannot use @A+C.
  265.    Only @A+DPTR, and @A+PC can be used with the 8051 language.
  266.  
  267. Cannot use @A+Rn
  268.    Only @A+DPTR, and @A+PC can be used with the 8051 language.
  269.  
  270. Cannot use @A.
  271.    The only valid combinations using @ are @R0, @R1, @DPTR, @A+DPTR, and @A+PC.
  272.  
  273. Cannot use @AB.
  274.    The only valid combinations using @ are @R0, @R1, @DPTR, @A+DPTR, and @A+PC.
  275.  
  276. Cannot use @C.
  277.    The only valid combinations using @ are @R0, @R1, @DPTR, @A+DPTR, and @A+PC.
  278.  
  279. Cannot use @PC.
  280.    The only valid combinations using @ are @R0, @R1, @DPTR, @A+DPTR, and @A+PC.
  281.  
  282. Cannot use PC as a register.
  283.    PC only appears in the combination @A+PC in the statement movc A, @A+PC.
  284.  
  285. Code address out of range.
  286.    Code addresses can only range from 0 to ffff hex (or 0 to 65535 decimal).
  287.  
  288. Data address out of range.
  289.    Only direct data register addresses (0 to 7f hex, or 0 to 127), or special
  290.    function register addresses can be used here.
  291.  
  292. Decimal number has non-decimal digits.
  293.    The number indicated has hexadecimal digits (a through f, or A through F)
  294.    but no hexadecimal prefix (0x, 0X, 0h, 0H) or suffix (h, H, x, X).
  295.  
  296. Division by 0.
  297.    x / 0 is not defined.
  298.  
  299. Empty character constant.
  300.    A single quote cannot be quoted as a character (''').  Use '\'' instead.
  301.    Alternatively, you attempted to define an empty string ("") with single
  302.    quotes.
  303.  
  304. Expected an argument/prefix operator.
  305.    The expression indicated is probably missing a prefix operator, a symbol or
  306.    constant, or an opening parenthesis '('.
  307.  
  308. Expected segment type.
  309.    The statement: seg Type, must have Type code, xdata, or data.
  310.  
  311. Expected symbol after 'global'
  312.    Only symbols can be declared as global.
  313.  
  314. Expected symbol in 'extern'
  315.    Only symbols can be declared as external.
  316.  
  317. Expected type or 'equ' after 'extern'.
  318.    External symbols must be declared as a type (sfr, bit, code, data, xdata)
  319.    or as a numeric constant (equ).  The valid forms are:
  320.             extern (sfr, bit, code, data, xdata, or equ) Symbol, ..., Symbol
  321.  
  322. Expression type does not match.
  323.    The expression occurring on the right hand side of the statement of the
  324.    form: Symbol Type Value, does not have the indicated type.
  325.  
  326. Extra ','.
  327.    An extra command was inserted after the last operand.  Alternatively, the
  328.    operand following the last comma is missing.
  329.  
  330. Illegal combination: address + address
  331.    Only numeric values can be added to or subtracted from addresses.  The
  332.    rules for address arithmetic are basically like those in C.
  333.  
  334. Illegal combination: number - address
  335.    Numbers can only be subtracted from addresses, not the other way around.  The
  336.    rules for address arithmetic are basically like those in C.
  337.  
  338. Illegal combination: reg.bit
  339.    Only numeric values in the range 0 to 7 can be used in place of "bit", not
  340.    addresses.
  341.  
  342. Indirect registers are not bit addressible.
  343.    The register referred to ("reg") must be a data address in the range 20-2f.
  344.    The address referred to lies above 80 (hex).  It is possible you may have
  345.    meant to use a Special Function Register here, not a data address.
  346.  
  347. Invalid addressing mode: <MNEMONIC>
  348.    This mnemonic is not defined for this combination of operands.
  349.  
  350. Missing '(' in 'if (...)'.
  351.    The if statement must have the form: if (x) ..., as it does in C.
  352.  
  353. Missing ')'
  354.    An unmatched closing parenthesis, ')', or possibly an extra opening
  355.    parenthesis, '(', occurred.
  356.  
  357. Missing ')' in 'if (...)'.
  358.    The if statement must have the form: if (x) ..., as it does in C.
  359.  
  360. Missing ':'
  361.    The conditional indicated is missing a colon.  Conditional expressions have
  362.    the form x? x: x.
  363.  
  364. Missing ';'
  365.    Semi-colons must be used between two or more statements on the same line.
  366.    You may have mistyped a colon (:) insteady.
  367.  
  368. Missing '}'.
  369.    An opening bracket '{' was never closed off with a ')'.
  370.  
  371. Missing DPTR or PC after @A+
  372.    Only @A+DPTR, and @A+PC can be used with the 8051 language.
  373.  
  374. Missing a ' in character constant.
  375.    No more than one item can be enclosed between single quotes (e.g. 'ab', or
  376.    'a\n', though '\n' is okay.)  You may have meant to define a string here.
  377.    Use double quotes.
  378.  
  379. Modulo by 0
  380.    x  684s not defined.
  381.  
  382. Number <NAME> redeclared as address: <FILE> <FILE>
  383.    The symbol indicated was declared as a global address in the first indicated
  384.    files and as a global number in the second.
  385.  
  386. Octal number has non-octal digits.
  387.    A number with an octal prefix (0, other than those with an appropriate
  388.    suffix), or an octal suffix (o, O, q, Q) can only contain the digits 0
  389.    through 7.
  390.  
  391. Only code, xdata, or data segments allowed.
  392.    The types sfr and bit cannot be used with segments.
  393.  
  394. Paged address out of range.
  395.    Paged jump or call instructions (ajmp, acall) must have destinations that lie
  396.    on the same code page (every 800 hex bytes, starting at 0 is a code page).
  397.    This only happens when your program gets beyond a certain size, or when it
  398.    is located at an odd address (such as 7ff hex).  Generally, it's a good idea
  399.    to start your programs on even multiples of 800 hex.  Stand-alone programs
  400.    have to start at the reset address (0) anyway.
  401.  
  402. Redeclaring address <NAME> as number.
  403.    A symbol already defined as an address is being declared as an external
  404.    numeric value.
  405.  
  406. Redeclaring local symbol <NAME> as external.
  407.    A symbol already defined as a local symbol is being defined as external.
  408.    This may also be a name clash between a local and global symbol.
  409.  
  410. Redeclaring number <NAME> as address.
  411.    A symbol already defined as a number is being declared as an external
  412.    address.
  413.  
  414. Register address out of range.
  415.    Only directly addressible data registers (0 to 7f hex, or 0 to 127) can be
  416.    used here.  This error may have inadvertently been created by the assembler
  417.    if you defined relatively addresses data registers, and the assembler tried
  418.    to map them beyond 80 hex.  See the Bugs section of the document.
  419.  
  420. Register in @Rn out of range.
  421.    Only registers R0 or R1 can be used as register pointers.
  422.  
  423. Register in reg.bit not bit addressible.
  424.    The register referred to ("reg") must be a data address in the range 20-2f
  425.    (hexadecimal, 32-47 decimal), or must be one of the Special Function
  426.    Registers whose address is evenly divisible by 8 (in hexadecimal: 80, 88,
  427.    90, ..., f0, f8).
  428.  
  429. Register must appear after @.
  430.    Numeric or address expressions cannot appear after @.
  431.  
  432. Relative address cannot be used here
  433.    Only absolute addresses, or numeric values containing objects that have been
  434.    previously defined (in terms of other such absolute objects) can appear in
  435.    the conditional (if (E) ...), or in address setting/modifying statements
  436.    (org/at, ds/rb, rw).
  437.  
  438. Relative address out of range.
  439.    Some jump instruction (cjne, djnz, sjmp, jz, jnz, jc, jnc, jbc, jb, jnb)
  440.    require their destinations to be within a certain range (-80 hex to +7f hex)
  441.    of the first byte following the jump instruction.  Generally, you should not
  442.    use these operations to jump across segment boundaries when one or more of
  443.    the segments is relatively addressed.
  444.  
  445. SFR address out of range.
  446.    Special function register addresses can only have values in the range (80
  447.    to ff hex, or 128 to 255 decimal).
  448.  
  449. Symbol <NAME> already declared as external number.
  450.    The symbol indicated was declared as an external numeric constant but was
  451.    defined as an address.
  452.  
  453. Symbol <NAME> already declared as external.
  454.    The symbol indicated was already declared as an external/global, and so
  455.    cannot be defined as a variable, or local constant.  If you had intended
  456.    to define it as a global constant, precede the definition with the word
  457.    'global' or 'public'.
  458.  
  459. Symbol <NAME> already declared as number.
  460.    The symbol indicated was used in the context LABEL:, but is already declared
  461.    as a numeric constant.
  462.  
  463. Symbol <NAME> already defined as constant.
  464.    Constant symbols cannot be redefined as variables.
  465.  
  466. Symbol <NAME> already defined.
  467.    Constant symbols can only be defined once.
  468.  
  469. Symbol <NAME> cannot be equated to relative address.
  470.    The symbol indicated was declared as an external numeric constant.  It
  471.    can only be set to an absolute address or numeric value.
  472.  
  473. Symbol <NAME> cannot be set to relative address.
  474.    Variables can only be set to absolute addresses, or numbers.
  475.  
  476. Symbol <NAME> redefined: <FILE> <FILE>.
  477.    The symbol indicated was defined as a global in both of the files listed.  It
  478.    can only be defined as a global once.
  479.  
  480. Symbol <NAME>'s type does not match.
  481.    The symbol indicated was declared as an external of one type and defined as
  482.    a global of a different type.
  483.  
  484. Syntax error
  485.    This statement so totally eluded the assembler's ability to process it, that
  486.    it didn't even know what you intended.  This can also occur if it gets set
  487.    off-track as a result of previous errors.
  488.  
  489. Too many arguments specified.
  490.    More operands were supplied than is accepted by this mnemonic.
  491.  
  492. Too many gaps.
  493.    Each time you issue a statement to the assembler to reserve space (ds/rb, rw)
  494.    the assembler internally creates a gap for it.  No more than 256 such
  495.    statements can occur per file.  You should probably break this file into
  496.    smaller modules.
  497.  
  498. Type mismatch <NAME>: <FILE> <FILE>
  499.    The symbol indicated was declared as a global with different types in the
  500.    files indicated.
  501.  
  502. Type mismatch: <NAME>.
  503.    A symbol already defined as an address of one type is being declared as an
  504.    address of another type.
  505.  
  506. Undefined expression
  507.    The expression indicated must be defined either as an absolute or relative
  508.    address, or number in this statemen.  This occurs in any statement where a
  509.    new label is being defined.
  510.  
  511. Undefined label <DIGIT>
  512.    A numeric label was used in a forward reference (e.g. 1f, 2f, 3f, ...), but
  513.    was not defined anywhere in the current segment.  Numeric labels can not be
  514.    referenced across segments.
  515.  
  516. Undefined local symbol <DIGIT>b
  517.    A backward reference was made to a numeric label (e.g. 1b, 2b, 3b, ...) that
  518.    was not previously defined in the current segment.  References to numeric
  519.    labels cannot be made across segments.
  520.  
  521. Undefined symbol: <NAME>
  522.    If a line number and file are indicated, then either the symbol is being
  523.    used on the right hand side of a label definition (in which case, its value
  524.    must be an already known absolute address, or number), you may be using a
  525.    mnemonic not known to the assembler, may have misspelled one that is known,
  526.    or you may have tried to write a label-defining statement but made an
  527.    error somewhere.
  528.    If no line and file numer are indicated, the symbol indicated was used in
  529.    the file without ever being defined.  It needs to be declared as an external
  530.    (if it is defined in another file) or needs to be defined before it is used.
  531.  
  532. Unexpected EOF inside // comment.
  533.    A // comment occurred at the end of the current file, and no end of line
  534.    marker was seen.  This indicates your source file is not in text mode.
  535.  
  536. Unexpected EOF inside ;; comment.
  537.    A ;; comment occurred at the end of the current file, and no end of line
  538.    marker was seen.  This indicates your source file is not in text mode.
  539.  
  540. Unexpected EOF inside comment.
  541.    A /* comment was seen, but was never closed with a */.
  542.  
  543. Unexpected EOF inside string.
  544.    A double quote was seen without a matching pair anywhere.
  545.  
  546. Unresolved external: <NAME>.
  547.    A symbol was declared as an external but wasn't defined anywhere.  If it's
  548.    a register or bit address defined for one of the 8051 extensions (8052,
  549.    or 8051fa), you will have to use one of the include files provided (8052.h
  550.    or 8051fa.h), or make your own.
  551.  
  552. Variables cannot be made global.
  553.    The keyword 'global' cannot be used with the statements Var = Val, or
  554.    Var set Val.  Variables can only be defined as local symbols.
  555.  
  556. Word value out of range.
  557.    An immediate word value (range -8000 to ffff hex, or -32768 to 65535
  558.    decimal) is required here.
  559.